﻿using Microsoft.Extensions.Configuration;
using ZhongKeSite.Common.Configuration;

namespace ZhongKeSite.Common
{
    public static class CommonConst
    {
        /// <summary>
        /// 默认支付密码
        /// </summary>
        public const string PayPwd = "123456";
        /// <summary>
        /// Http 超时时间单位: 秒
        /// </summary>
        public const int HttpTimeout = 120;
        /// <summary>
        /// root
        /// </summary>
        public const string Root = "root";
        /// <summary>
        /// All
        /// </summary>
        public const string All = "All";
        /// <summary>
        /// &
        /// </summary>
        public const string And = "&";
        /// <summary>
        /// 逗号 ,
        /// </summary>
        public const string Comma = ",";
        /// <summary>
        /// 1
        /// </summary>
        public const string One = "1";
        /// <summary>
        /// 时间格式 yyyyMMdd
        /// </summary>
        public const string ShortDateFormat = "yyyyMMdd";
        /// <summary>
        /// 时间格式 yyyyMMddHHmmss
        /// </summary>
        public const string DateFormat = "yyyyMMddHHmmss";
        /// <summary>
        /// 时间格式 yyyy-MM-dd
        /// </summary>
        public const string ShortTimeFormat = "yyyy-MM-dd";
        /// <summary>
        /// 分钟时间格式 yyyy-MM-dd HH:mm
        /// </summary>
        public const string MiddleDateFormat = "yyyy-MM-dd HH:mm";
        /// <summary>
        /// 长时间格式 yyyy-MM-dd HH:mm:ss
        /// </summary>
        public const string LongDateFormat = "yyyy-MM-dd HH:mm:ss";
        /// <summary>
        /// 网络异常，请稍后再试
        /// </summary>
        public const string SystemErrorMessage = "网络异常，请稍后再试";
        /// <summary>
        /// 订单不存在
        /// </summary>
        public const string OrderNotExist = "订单不存在";
        /// <summary>
        /// 商户不存在
        /// </summary>
        public const string MerchantNotExist = "商户不存在";
        /// <summary>
        /// 订单信息异常
        /// </summary>
        public const string OrderInfoError = "订单信息异常";
        /// <summary>
        /// 您好！ 当月申请次数已经达到上限
        /// </summary>
        public const string MaxApplyError = "您好！ 当月申请次数已经达到上限";
        /// <summary>
        /// 您好！ 您的商户状态未激活
        /// </summary>
        public const string MerchantStatusError = "您好！ 您的商户状态未激活";
        /// <summary>
        /// 参数异常
        /// </summary>
        public const string ParamterError = "参数异常";
        /// <summary>
        /// 成功
        /// </summary>
        public const string Success = "成功";
        /// <summary>
        /// 失败
        /// </summary>
        public const string Fail = "失败";

        /// <summary>
        /// ContentType = application/json
        /// </summary>
        public const string ContentTypeJson = "application/json";

        /// <summary>
        /// ContentType = application/xml
        /// </summary>
        public const string ContentTypeXml = "application/xml";

        /// <summary>
        /// ContentType = application/x-www-form-urlencoded
        /// </summary>
        public const string ContentTypeXwwwFormUrlencoded = "application/x-www-form-urlencoded";

        /// <summary>
        /// ContentType = text/plain
        /// </summary>
        public const string ContentTypeText = "text/plain";

        /// <summary>
        /// ContentType = multipart/form-data  常见的 POST 数据提交的方式。我们使用表单上传文件时
        /// </summary>
        public const string ContentTypeFormData = "multipart/form-data";

        /// <summary>
        /// text/html
        /// </summary>
        public const string ContentTypeTextHtml = "text/html";

        /// <summary>
        /// 0：字符串
        /// </summary>
        public const string Zero = "0";

        /// <summary>
        /// 金额后2位 N2
        /// </summary>
        public const string N2 = "N2";

        /// <summary>
        /// 金额后2位 f2
        /// </summary>
        public const string F2 = "f2";
        /// <summary>
        /// 权限缓存时间
        /// </summary>
        public const int RightListExpire = 7200;
        /// <summary>
        /// 后台管理员cookie服务
        /// </summary>
        public const string AdminAuthenticationScheme = "YiTiXinAdminAuthenticationScheme";
        /// <summary>
        /// 商户管理后台
        /// </summary>
        public const string MerchantAuthenticationScheme = "YiTiXinMerchantAuthenticationScheme";
        /// <summary>
        /// 代理管理后台
        /// </summary>
        public const string AgentAuthenticationScheme = "YiTiXinAgentAuthenticationScheme";
        /// <summary>
        /// 客户端
        /// </summary>
        public const string ClientAuthenticationScheme = "YiTiXinClientAuthenticationScheme";
        /// <summary>
        /// 当前登录用户帐号
        /// </summary>
        public const string UserID = "UserID";
        /// <summary>
        /// 当前登录用户的名称
        /// </summary>
        public const string UserName = "UserName";
        /// <summary>
        /// 当前登录用户的登录名
        /// </summary>
        public const string Login = "Login";
        /// <summary>
        /// 登录IP
        /// </summary>
        public const string LoginIP = "LoginIP";
        /// <summary>
        /// 浏览器信息UserAgent
        /// </summary>
        public const string UserAgent = "UserAgent";
        /// <summary>
        /// 当前登录用户的角色ID,0:超级管理员，10：系统管理员，20：商户管理员，30：普通用户
        /// </summary>
        public const string RoleId = "RoleId";
        /// <summary>
        /// 上次登录时间
        /// </summary>
        public const string LastLoginDate = "LastLoginDate";
        /// <summary>
        /// 登录总数
        /// </summary>
        public const string LoginCount = "LoginCount";
        /// <summary>
        /// 前台菜单缓存值
        /// </summary>
        public const string CacheMenu = "NetCore_Cache_Menu";
        /// <summary>
        /// 菜单缓存值
        /// </summary>
        public const string CacheSysRight = "NetCore_Cache_Sys_Right_";
        /// <summary>
        /// 连接字符串
        /// </summary>
        public static string ConnString = ConfigurationService.GetConfiguration().GetConnectionString("DefaultConnection");
        /// <summary>
        /// 乙方
        /// </summary>
        public const string PartyB = "深圳ZhongKeSite信息技术有限公司";
        /// <summary>
        /// 乙方
        /// </summary>
        public const string PartyBAddress = "深圳市宝安区新安街道前海卓越时代广场C座1005室";
        /// <summary>
        /// 法人
        /// </summary>
        public const string PartyBLegal = "陈健华";

    }
}
